package com.gitee.wsl.text.regex.sample

val Regex.Companion.NoNumbersRule: Regex
    get() = ".*\\d.*".toRegex()

val Regex.Companion.OnlyNumbersRule: Regex
    get() = "\\d+".toRegex()

val Regex.Companion.StartsWithNumberRule: Regex
    get() = "^(\\d+.*|-\\d+.*)".toRegex()

val Regex.Companion.ValidNumberRule: Regex
    get() = "([+-]?(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*))(?:[e]([+-]?\\d+))?".toRegex()


//数字/货币金额（支持负数、千分位分隔符）
val Regex.Companion.MONEY: Regex
    get() = """^-?\d{1,3}(,\d{3})*(\.\d{1,2})?${'$'}""".toRegex()

